module(...,package.seeall)

function new()
    local localGroup = display.newGroup()
    
    local bg = display.newImage("images/backgrounds/bg_credits")
    bg:setReferencePoint(display.CenterReferencePoint)
    bg.x = _W/2; bg.y = _H/2;
    bg.scene = "menu"
    
    -- Detecta o toque e muda para a cena
    local function changeScene(e)
        if (e.phase == "ended") then
            director:changeScene(e.target.scene)
        end
    end
    
    -- Inserindo na cena
    localGroup:insert(bg)
    
    -- Adicionando tratador de evento ao bg
    bg:addEventListener("touch" , changeScene)
    
    return localGroup
end